package com.xuecheng.teaching.controller;

import com.xuecheng.commons.model.dto.CommentReplyDto;
import com.xuecheng.commons.model.vo.CommentReplyVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.xuecheng.teaching.service.CommentReplyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 作者
 */
@Slf4j
@RestController
@RequestMapping("/course-comment-reply")
public class CommentReplyController {

    @Autowired
    private CommentReplyService  commentReplyService;

    /*课程评论回复
     * Path： /teaching/course-comment-reply
    * Method： POST
    * Content-Type 	application/json 	是
    * commentId	integer	必须		评论Id
    * forbidReply	integer	非必须		是否禁止回复  1禁止 0允许
    * replyText	string	必须		回复内容
     * */
    @PostMapping
    public ResponseResult<CommentReplyVo> commentreply(@RequestBody CommentReplyDto dto){
        return commentReplyService.commentreply(dto);
    }
}
